<!DOCTYPE html>
<html>
  {% include 'header.html' %}
  <body>
    <div class="create">
      <h4>Pizza State</h4>
      <hr/>
      <!-- START FORM -->
        <div class="row">
          <form class="col s12" action="submitPizza" method="POST">
              <input  onclick="location.href='/changeOwner/retailer';" class="waves-light btn our-colour" type="button" value="Transfer Ownership" style="color: white;"  name="">
          </form>
        </div>
      <!-- END FORM -->
          </div>
    <br> 
    <div class="transactions">
      <h4>Pizza Transactions</h4>
      <hr/>
      <!-- START TABLE -->
      <table>
        <thead>
          <tr>
              <th>Transaction ID</th>
              <th>New Owner</th>
              <th>Timestamp</th>
          </tr>
        </thead>
        <tbody>
          {% for arr in transactions %}
          <tr>
            <td>{{ arr['transactionId'] }}</td>
            <td>{{ myOwnerFunc(arr['newOwner']) }}</td>
            <td>{{ myChangeFunc(arr['timestamp']) }}</td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
      <!-- END TABLE -->
</div>
  </body>
</html>
